import type { PtPageJson } from "@/modules/pt-page/types";

export const p: PtPageJson = {
    // 版本号
    version: 1,

    // 最后编辑时间
    lastEditTime: "2022-11-09 15:00:00",

    // 页面ID
    id: 124,

    // 页面标题
    title: "xxx实验中学手册",

    // 项目配置
    performance: {
        // A4纸长宽
        width: 595,
        height: 842
    },

    // 公共数据，全局可用
    // 值为null时表示未设置值，给二次填充时设置
    // 一般值为数字或字符串
    data: {
        /* 动态数据 */

        // 公共数据
        org: {
            name: 'xxx实验中学'
        },
        grade: {},
        class: {},

        // 个人数据
        student: {
            name: '张三',
            className: '三年二班'
        },

        booklet: {
            recordDate: '2022-11-09 15:00:00'
        },

        /* 固定数据 */
        base: {
            bg1: 'https://t.shijiwxy.5tree.cn/group2/M00/00/C3/wKgAPWZP_FSATCqiAA9FwacM6Xg012.jpg',
            bg2: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZP_FuAGvwXAAhqQgsCdCM057.jpg',
            bg4: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZP_GeARcswAA-0rQvYAaE827.jpg',
            avatar: 'https://picsum.photos/150/150',
            classImage: 'https://picsum.photos/397/262',
            bodys: [
                ['检查月份', '体重(cm)', '身高(cm)', '头围(cm)', '胸围(cm)', '腰围(cm)', '左眼视力', '右眼视力'],
                {
                    date: '2024年5月',
                    weight: '76.2',
                    height: '76.2',
                    t: '76.2',
                    x: '76.2',
                    y: '76.2',
                    lv: '76.2',
                    rv: '76.2'
                },
                {
                    date: '2024年5月',
                    weight: '30.7',
                    height: '30.7',
                    t: '30.7',
                    x: '30.7',
                    y: '30.7',
                    lv: '30.7',
                    rv: '30.7'
                }
            ],
            contents: [
                {
                    title: '这个领域',
                    bg: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZP_GOAWMTlAAq9dgZx3KU394.jpg',
                    photo: 'https://picsum.photos/397/262',
                    info: '三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班'
                },
                {
                    title: '那个领域',
                    bg: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZP_GOAWMTlAAq9dgZx3KU394.jpg',
                    photo: 'https://picsum.photos/397/263',
                    info: '┻┳|･ω･)问我？返回是哦佛寺 调研绝望坡拼凑诶温州科技助滤剂而来自付出处女座中紫雷水'
                },
            ],
            contents2: [
                {
                    title: '这个领域2',
                    bg: 'https://t.shijiwxy.5tree.cn/group2/M00/00/C3/wKgAPWZT6o-APOX1AAx_FBAPxq0935.jpg',
                    photo: 'https://picsum.photos/397/262',
                    info: '三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班三年二班'
                },
                {
                    title: '那个领域2',
                    bg: 'https://t.shijiwxy.5tree.cn/group2/M00/00/C3/wKgAPWZT6o-APOX1AAx_FBAPxq0935.jpg',
                    photo: 'https://picsum.photos/397/263',
                    info: '┻┳|･ω･)问我？返回是哦佛寺 调研绝望坡拼凑诶温州科技助滤剂而来自付出处女座中紫雷水'
                },
            ],
            contents3: [
                {
                    title: '这个领域3',
                    bg: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZT6teAc7DGAAcixh54k_E638.jpg',
                    photo: 'https://picsum.photos/397/264',
                    info: 'doijfsoijfeiojfsdiojdfsoijfdsiojdsfoijfds'
                },
                {
                    title: '那个领域3',
                    bg: 'https://t.shijiwxy.5tree.cn/group1/M00/06/20/wKgAb2ZT6teAc7DGAAcixh54k_E638.jpg',
                    photo: 'https://picsum.photos/397/265',
                    info: '无穷无尽发我为缴费我为解耦为即将藕粉解耦if而我为解耦为见覅偶借我为较为佛为即将'
                },
            ]
        }
    },

    // 页面列表
    pages: [
        {
            // 页面标题
            title: "首页",

            // 页面描述信息
            description: "首页",

            // 页面组件配置
            components: [
                {
                    name: 'bg',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg1'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'studentName',
                    type: 'text',
                    options: {
                        x: 177,
                        y: 311,
                        width: 106,
                        height: 31
                    },
                    value: {
                        text: 'student:name'
                    },
                    render: {
                        size: 18,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'studentClass',
                    type: 'text',
                    options: {
                        x: 371,
                        y: 311,
                        width: 106,
                        height: 31
                    },
                    value: {
                        text: 'student:className'
                    },
                    render: {
                        size: 18,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'avatar',
                    type: 'image',
                    options: {
                        x: 225,
                        y: 62,
                        width: 147,
                        height: 147
                    },
                    value: {
                        src: 'avatar'
                    },
                    render: {
                        fit: 'cover',
                        borderRadius: -1,
                        borderColor: '#fff'
                    }
                },
            ]
        },
        {
            title: "扉页",
            description: "扉页",
            components: [
                {
                    name: 'bg2',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg2'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'classImage',
                    type: 'image',
                    options: {
                        x: 99,
                        y: 99,
                        width: 397,
                        height: 262
                    },
                    value: {
                        src: 'classImage'
                    },
                    render: {
                        borderRadius: 6,
                        fit: 'cover'
                    }
                },
                {
                    name: 'body',
                    type: 'table',
                    options: {
                        x: 58,
                        y: 500,
                        width: 482,
                        height: 200
                    },
                    value: {
                        data: 'bodys',
                        rows: [
                            ['.0', '.1', '.2', '.3', '.4', '.5', '.6', '.7'],
                            ['.date', '.weight', '.height', '.t', '.x', '.y', '.lv', '.rv'],
                            ['.date', '.weight', '.height', '.t', '.x', '.y', '.lv', '.rv'],
                        ]
                    },
                    render: {
                        border: true,
                        borderColor: '#ed9c49',
                        background: '#fff',
                        textAlign: 'center'
                    }
                },
            ]
        },
        {
            title: "内容页1",
            description: "内容页1",
            mode: 'loop',
            origin: 'base.contents.*',
            components: [
                {
                    name: 'bg',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'title',
                    type: 'text',
                    options: {
                        originAlign: 'center',
                        y: 20,
                        width: '100%',
                        height: 50
                    },
                    value: {
                        text: 'title'
                    },
                    render: {
                        size: 34,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'info',
                    type: 'text',
                    options: {
                        x: 121,
                        y: 517,
                        width: 354,
                        height: 214
                    },
                    value: {
                        text: 'info'
                    },
                    render: {
                        size: 18,
                        indent: 36,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'photo',
                    type: 'image',
                    options: {
                        x: 139,
                        y: 147,
                        width: 304,
                        height: 213
                    },
                    value: {
                        src: 'photo'
                    },
                    render: {
                        fit: 'cover'
                    }
                }
            ]
        },
        {
            title: "内容页2",
            description: "内容页2",
            mode: 'loop',
            origin: 'base.contents2.*',
            components: [
                {
                    name: 'bg',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'title',
                    type: 'text',
                    options: {
                        originAlign: 'center',
                        y: 20,
                        width: '100%',
                        height: 50
                    },
                    value: {
                        text: 'title'
                    },
                    render: {
                        size: 34,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'info',
                    type: 'text',
                    options: {
                        x: 161,
                        y: 495,
                        width: 258,
                        height: 214
                    },
                    value: {
                        text: 'info'
                    },
                    render: {
                        size: 18,
                        indent: 36,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'photo',
                    type: 'image',
                    options: {
                        x: 91,
                        y: 112,
                        width: 404,
                        height: 252
                    },
                    value: {
                        src: 'photo'
                    },
                    render: {
                        fit: 'cover'
                    }
                }
            ]
        },
        {
            title: "内容页3",
            description: "内容页3",
            mode: 'loop',
            origin: 'base.contents3.*',
            components: [
                {
                    name: 'bg',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'title',
                    type: 'text',
                    options: {
                        originAlign: 'center',
                        y: 20,
                        width: '100%',
                        height: 50
                    },
                    value: {
                        text: 'title'
                    },
                    render: {
                        size: 34,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'info',
                    type: 'text',
                    options: {
                        x: 117,
                        y: 504,
                        width: 339,
                        height: 115
                    },
                    value: {
                        text: 'info'
                    },
                    render: {
                        size: 18,
                        indent: 36,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                },
                {
                    name: 'photo',
                    type: 'image',
                    options: {
                        x: 99,
                        y: 114,
                        width: 391,
                        height: 202
                    },
                    value: {
                        src: 'photo'
                    },
                    render: {
                        fit: 'cover'
                    }
                }
            ]
        },
        {
            title: "尾页",
            description: "尾页",
            components: [
                {
                    name: 'bg4',
                    type: 'image',
                    options: {
                        width: '100%',
                        height: '100%'
                    },
                    value: {
                        src: 'bg4'
                    },
                    render: {
                        fit: "cover",
                        fitVertical: "top"
                    }
                },
                {
                    name: 'orgName',
                    type: 'text',
                    options: {
                        originAlign: 'center',
                        y: 420,
                        width: '100%',
                        height: 40
                    },
                    value: {
                        text: 'org:name'
                    },
                    render: {
                        size: 34,
                        textAlign: 'center',
                        verticalAlign: 'middle'
                    }
                }
            ]
        }
    ],
};

